Skip to content

Screen extensions registry - #16

Merged
jayjfletcher merged 34 commits into
mainfrom
ring-master/2026-10-29-2037-screen-extensions-registry
Oct 30, 2026
Merged

jayjfletcher merged 34 commits into
mainfrom
ring-master/2026-10-29-2037-screen-extensions-registry

Conversation

@jayjfletcher

Copy link
Copy Markdown
Member

Risk: high

What changed

  • New Domains/Screens:
    • the ScreenExtensions registry, a singleton reached through Atrium::screens()
    • TabDefinition and SectionDefinition
    • Screen, with standard() slots: header.actions, before, after, aside, and the row slot row.actions
    • ResolvedScreen
    • the per-request memo ScreenVisibility
    • wildcard targets * and {package}.*
    • the x-atrium::screen-tabs, screen-tab-panel and screen-sections components
    • the Testing\ResetsScreenExtensions trait
  • All five Atrium pages declare themselves with a tab bar, the standard slots and a Gate access() check: the dashboard, the named dashboard, widget detail, the settings index (with a row.actions slot on each panel row) and the settings panel.
  • Removed and moved to Keen (D-014, D-016):
    • the History domain, the history/{package} route and HistoryController
    • x-atrium::audit-trail and x-atrium::audit.*
    • Plugin::historyNavItem()
  • Added a README and Boost "Screen extensions" section, a CHANGELOG upgrade note, and a browser matrix over 6 themes, 2 layouts and light/dark.

Why

This makes "register it from your own package" the only way to add tabs and sections to any screen, so host packages stop checking whether other packages are installed (D-017: no package knows another; integrations go through config). It generalises Roster's registered tabs (Roster PR #5).

Look at

  • src/Domains/Screens/Services/ScreenExtensions.php: registration, the duplicate rules by environment (D-022), and exact/pkg.*/* precedence (D-023, D-028).
  • src/Domains/Screens/Services/ScreenVisibility.php: the per-request memo keyed by morph class plus key or the model itself. Visibility answers must never leak across viewers.
  • resources/views/components/screen-sections.blade.php: failure isolation. It snapshots and restores the view factory's state so that a throwing section can't break the page (D-015).
  • src/Domains/Settings/Data/SettingsPanelRow.php: the unsaved stand-in that carries each settings panel row (D-031, D-033).

Tested

  • composer test: phpstan 0 errors, pint, 100% type coverage, pest 589/589.
  • composer test:browser: 46/46, including the 24 theme × layout × mode cases. The gate didn't run this suite; I ran it by hand after the job escalated.
  • npm run build:css: public/atrium.css is unchanged, so the committed file is current.

Risks

  • Breaking: the history page, the audit components and historyNavItem() are gone. Every host that uses them breaks until its own spec lands (see Breaks). Merge as a group: Atrium, Keen, then the hosts (D-009).
  • Wildcard and row-slot closures run on every matching screen or row, so a slow registrant slows every page. The README tells registrants to return early.

Acceptance criteria and proving tests (round 3 gate)

  1. Unit/Screens/ScreenExtensionsTest, Feature/Screens/ResolveScreenTest
  2. Unit/Screens/TabDefinitionTest, SectionDefinitionTest
  3. Unit/Screens/ScreenExtensionsTest, ResolveScreenTest (all-digit keys)
  4. ResolveScreenTest (duplicates by environment, precedence)
  5. Unit/Screens/ScreenExtensionsTest (snapshot/restore/flush), Feature/Screens/ResetsScreenExtensionsTest
  6. Unit/Screens/ScreenTest
  7. ResolveScreenTest
  8. Feature/Screens/VisibilityTest
  9. Feature/Screens/EvaluationOrderTest
  10. Feature/Screens/RowSlotsTest
  11. Feature/Screens/WildcardRenderingTest
  12. Feature/Screens/FailureIsolationTest
  13. Feature/Screens/ScreenTabsComponentTest
  14. Feature/Screens/ScreenSectionsComponentTest
  15. Feature/Screens/OpenRegisteredTabTest
  16. Feature/Screens/ScreenStylesTest. After npm run build:css, public/atrium.css is unchanged.
    17, 18. tests/Browser/ScreenExtensionsTest.php: a dataset over 6 themes × 2 layouts × light/dark. composer test:browser passes 46/46.
  17. Feature/Screens/AtriumScreensTest
  18. Feature/HistoryRemovedTest, Feature/DocsTest, ArchTest
  19. Feature/DocsTest
  20. tests/ArchTest.php

Nits remaining: none.

Known issues (accepted)

  • The job escalated at review round 3 because the review rounds ran out. The only finding was minor: the gate didn't verify the browser suite or the CSS rebuild. Both were verified by hand afterwards. The browser suite passed 46/46, and the CSS rebuild produced no change.

Breaks

Removing the history page and audit components breaks these packages until their own specs land. Merge as a group: Atrium, Keen, then the hosts (D-009).

Package Files using x-atrium::audit*, historyNavItem() or atrium.history
Cortex 6
Impex 6
Keen 5
PennantPlus 4
Polycart 5
Roster 6
Showroom 12

Spec: docs/agent/specs/2026-10-29-2037-screen-extensions-registry/. This is the first spec of the Guardian and screen-extensions initiative, and the other specs build on it.

🤖 Generated with Claude Code

jayjfletcher and others added 30 commits October 29, 2026 16:39
…ions, screen and resolution (salvaged)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions, screen and resolution

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…om Atrium

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nts and the test-host screen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own screens

Declares atrium.dashboard, atrium.named-dashboard, atrium.dashboard-widget,
atrium.settings and atrium.settings-panel with Screen::standard() and renders
the tab bar, the open registered tab's panel and their slots per criterion 15.
row.actions on atrium.settings awaits a decision: a settings panel is not a
model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own screens

Per D-032, all five Atrium screens declare a Gate access() closure, so
permission() extensions show when the Gate allows them. D-031 (row.actions
per settings panel row) is held: the stand-in model would fail the lifecycle
events arch test, which needs a decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own screens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own screens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… layout matrix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… layout matrix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chitecture and build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chitecture and build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant